<div id="options">
    <?php if ($this->permission->check("insert", $this->mads->resCode)) { ?>
        <a href="<?php echo $this->url_add; ?>" class="btn" ><i class="icon-plus-sign"></i> Thêm mới</a>
        <?php }
    ?>
	<div class="btn-group margintop5 pull-right nav-tabs" data-toggle="buttons-radio">

 <a class="btn btn-mini <?php echo ($filter =='')?'active':'';?>" id="" href="<?php echo $this->url_index; ?>">Tất cả</a>
        <a class="btn btn-mini <?php echo ($filter =='index')?'active':'';?>" id="closed" href="<?php echo $this->url_index; ?>/index/index">Trang chủ</a>
        <a class="btn btn-mini <?php echo ($filter =='detail')?'active':'';?>" id="closed" href="<?php echo $this->url_index; ?>/index/detail">Trang chi tiết</a>
        <a class="btn btn-mini <?php echo ($filter =='category')?'active':'';?>" id="closed" href="<?php echo $this->url_index; ?>/index/category">Danh mục</a>
    
</div>
</div>

<script type="text/javascript">$(document).ready(function() {
            $('.nav-tabs #projects').button('toggle');
        });
    </script> 
<?php
$header = array('Vùng', 'Vị trí', 'Tên','Trạng thái');
$config = array(
    'header_icon' => 'icon-list',
    'header_title' => 'Quản lý '.@$tresource->RES_NAME,
    'ID' => '0',
    'tableClass' => '',
    'showEdit' => false,
    'showDelete' => false,
);
if ($this->permission->check("delete", $this->mads->resCode))
    $config['showDelete'] = true;

if ($this->permission->check("update", $this->mads->resCode))
    $config['showEdit'] = true;

$data = array();
//Các project tham gia
$stt = 0;
foreach ($datas as $result) {

    $data[] = array($result->ADS_ID, $result->ADS_CODE, $result->ADS_POSITION, $result->ADS_TITLE, $result->ADS_STATUS);
}

echo $this->atheme->table_simple($header, $data, $config);
?>

